/*
 * simes - simulador de escalonamento de processos
 * Copyright (C) 2006  Pablo A. Lerina Rodrigues
 *                     Armando Zaro
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#ifndef __QUEUE_H__
#define __QUEUE_H__

#include "stack.h"

/*
 * Estrutura do nodo "processando"
 */ 
typedef struct pcnd {
	struct proc *processo;
	int cnt;
}
t_processando;

/*
 * Estrutura quando nodo 
 * eh processo
 */
typedef struct proc {
	int entrada;
	int id;
	int estado;
	t_stack *comandos;
} 
t_processo;

/*
 * Estrutura quando nodo
 * eh recurso
 */
typedef struct res {
	int nome;
} 
t_recurso;

/*
 * Estrutura que representa um nodo da lista
 */
typedef struct node {
	void *data;
	struct node *next;
}
t_qnode;

/*
 * Estrutura que representa a fila
 */
typedef struct q {
	t_qnode *rear, *front;
}
t_queue;

void insert_node();
void *remove_node();
void ordered_insert_pnode();

#endif
